package com.itlong.cloud.operate.service;

import com.itlong.cloud.POJO.DTO.operate.OperateGroupGetPageDTO;
import com.itlong.cloud.POJO.PO.OperateGroupPO;
import com.itlong.cloud.utils.page.Page;

import java.util.List;

/**
 * <desc>
 *      组织业务处理接口
 * </desc>
 *
 * @createDate 2017/9/14
 */
public interface IOperateGroupService {

    /**
     * <desc>
     *      保存组织
     * </desc>
     *
     * @param operateGroupPO 组织实体
     * @return
     * @author Jiaqi.X
     * @createDate 2017/09/14
     */
    Integer save(OperateGroupPO operateGroupPO) throws Exception;

    /**
     * <desc>
     *      更新组织
     * </desc>
     *
     * @param operateGroupPO 组织实体
     * @return
     * @author Jiaqi.X
     * @createDate 2017/09/14
     */
    Integer update(OperateGroupPO operateGroupPO) throws Exception;

    /**
     * <desc>
     *      获取所有组织
     * </desc>
     *
     * @return
     * @author Jiaqi.X
     * @createDate 2017/09/14
     */
    List<OperateGroupPO> getList();

    /**
     * <desc>
     *      获取分页数据
     * </desc>
     *
     * @return
     * @author Jiaqi.X
     * @createDate 2017/09/15
     */
    Page<OperateGroupPO> getPage(OperateGroupGetPageDTO pageDTO) throws Exception;

    /**
     * <desc>
     *      根据id查询组织
     * </desc>
     *
     * @param operateGroupPO 组织实体
     * @return
     * @author Jiaqi.X
     * @createDate 2017/09/27
     */
    OperateGroupPO getOne(OperateGroupPO operateGroupPO);

    /**
     * <desc>
     *      将人员分配至部门
     * </desc>
     *
     * @param groupId 部门id
     * @param allotUsers 待分配的用户id 多个，号分隔
     * @param userIds 当前列表所有用户id 多个，号分隔
     * @return
     * @author Jiaqi.X
     * @createDate 2017/10/10
     */
    Integer saveGroupUsers(String groupId,String allotUsers,String userIds) throws Exception;
}
